<?php
$con = mysql_connect("localhost","root","password");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("thesis", $con);

$result = mysql_query("SELECT * FROM locations");

while($row = mysql_fetch_array($result))
  {
  echo $row['loc_id'] . "@" . $row['name'] . "@" . $row['latitude'] . "@" . $row['longitude'] . "@" . $row['description'] . "\n";
  //echo "<tr>";
  //echo "<td>" . $row['name'] . "</td>";
  //echo "<td>" . $row['latitude'] . "</td>";
  //echo "<td>" . $row['longitude'] . "</td>";
  //echo "</tr>";
  }

mysql_close($con);
?>